# -*- coding: utf-8 -*-
__author__ = 'ooo'
__date__ = ' 10:20'

import random
import time

def time_rand_number(min=1,max=100):
    if max > min:
        return time.strftime('%Y%m%d%H%M%S', time.localtime(time.time())) + str(random.randint(min, max))
    elif max == min:
        return time.strftime('%Y%m%d%H%M%S', time.localtime(time.time()))
    else:
        return None

def date_rand_number(min=1,max=100):
    if max > min:
        return time.strftime('%Y%m%d', time.localtime(time.time())) + str(random.randint(min, max))
    elif max == min:
        return time.strftime('%Y%m%d', time.localtime(time.time()))
    else:
        return None

#
# '''获取文件的大小,结果保留两位小数，单位为MB'''
# def get_FileSize(filePath):
#     filePath = unicode(filePath,'utf8')
#     fsize = os.path.getsize(filePath)
#     fsize = fsize/float(1024*1024)
#     return round(fsize,2)